Integrand size = 39, antiderivative size = 330 \[ \int \frac {\cos (c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^3} \, dx=-\frac {(3 A b-a B) x}{a^4}-\frac {\left (15 a^2 A b^4-6 A b^6+6 a^5 b B-5 a^3 b^3 B+2 a b^5 B-2 a^6 C-a^4 b^2 (12 A+C)\right ) \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a^4 (a-b)^{5/2} (a+b)^{5/2} d}-\frac {\left (11 a^2 A b^2-6 A b^4-5 a^3 b B+2 a b^3 B-a^4 (2 A-3 C)\right ) \sin (c+d x)}{2 a^3 \left (a^2-b^2\right )^2 d}+\frac {\left (A b^2-a (b B-a C)\right ) \sin (c+d x)}{2 a \left (a^2-b^2\right ) d (a+b \sec (c+d x))^2}-\frac {\left (3 A b^4+4 a^3 b B-a b^3 B-2 a^4 C-a^2 b^2 (6 A+C)\right ) \sin (c+d x)}{2 a^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))} \]
-(3*A*b-B*a)*x/a^4-(15*a^2*A*b^4-6*A*b^6+6*a^5*b*B-5*a^3*b^3*B+2*a*b^5*B-2 *a^6*C-a^4*b^2*(12*A+C))*arctanh((a-b)^(1/2)*tan(1/2*d*x+1/2*c)/(a+b)^(1/2 ))/a^4/(a-b)^(5/2)/(a+b)^(5/2)/d-1/2*(11*A*a^2*b^2-6*A*b^4-5*B*a^3*b+2*B*a *b^3-a^4*(2*A-3*C))*sin(d*x+c)/a^3/(a^2-b^2)^2/d+1/2*(A*b^2-a*(B*b-C*a))*s in(d*x+c)/a/(a^2-b^2)/d/(a+b*sec(d*x+c))^2-1/2*(3*A*b^4+4*B*a^3*b-B*a*b^3- 2*a^4*C-a^2*b^2*(6*A+C))*sin(d*x+c)/a^2/(a^2-b^2)^2/d/(a+b*sec(d*x+c))
Result contains complex when optimal does not.
Time = 9.74 (sec) , antiderivative size = 1015, normalized size of antiderivative = 3.08 \[ \int \frac {\cos (c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^3} \, dx=-\frac {2 (3 A b-a B) x (b+a \cos (c+d x))^3 \sec (c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{a^4 (A+2 C+2 B \cos (c+d x)+A \cos (2 c+2 d x)) (a+b \sec (c+d x))^3}+\frac {\left (12 a^4 A b^2-15 a^2 A b^4+6 A b^6-6 a^5 b B+5 a^3 b^3 B-2 a b^5 B+2 a^6 C+a^4 b^2 C\right ) (b+a \cos (c+d x))^3 \sec (c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \left (-\frac {2 i \arctan \left (\sec \left (\frac {d x}{2}\right ) \left (\frac {\cos (c)}{\sqrt {a^2-b^2} \sqrt {\cos (2 c)-i \sin (2 c)}}-\frac {i \sin (c)}{\sqrt {a^2-b^2} \sqrt {\cos (2 c)-i \sin (2 c)}}\right ) \left (-i b \sin \left (\frac {d x}{2}\right )+i a \sin \left (c+\frac {d x}{2}\right )\right )\right ) \cos (c)}{a^4 \sqrt {a^2-b^2} d \sqrt {\cos (2 c)-i \sin (2 c)}}-\frac {2 \arctan \left (\sec \left (\frac {d x}{2}\right ) \left (\frac {\cos (c)}{\sqrt {a^2-b^2} \sqrt {\cos (2 c)-i \sin (2 c)}}-\frac {i \sin (c)}{\sqrt {a^2-b^2} \sqrt {\cos (2 c)-i \sin (2 c)}}\right ) \left (-i b \sin \left (\frac {d x}{2}\right )+i a \sin \left (c+\frac {d x}{2}\right )\right )\right ) \sin (c)}{a^4 \sqrt {a^2-b^2} d \sqrt {\cos (2 c)-i \sin (2 c)}}\right )}{\left (-a^2+b^2\right )^2 (A+2 C+2 B \cos (c+d x)+A \cos (2 c+2 d x)) (a+b \sec (c+d x))^3}+\frac {(b+a \cos (c+d x)) \sec (c) \sec (c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \left (-A b^5 \sin (c)+a b^4 B \sin (c)-a^2 b^3 C \sin (c)+a A b^4 \sin (d x)-a^2 b^3 B \sin (d x)+a^3 b^2 C \sin (d x)\right )}{a^4 \left (a^2-b^2\right ) d (A+2 C+2 B \cos (c+d x)+A \cos (2 c+2 d x)) (a+b \sec (c+d x))^3}+\frac {(b+a \cos (c+d x))^2 \sec (c) \sec (c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \left (9 a^2 A b^4 \sin (c)-6 A b^6 \sin (c)-7 a^3 b^3 B \sin (c)+4 a b^5 B \sin (c)+5 a^4 b^2 C \sin (c)-2 a^2 b^4 C \sin (c)-8 a^3 A b^3 \sin (d x)+5 a A b^5 \sin (d x)+6 a^4 b^2 B \sin (d x)-3 a^2 b^4 B \sin (d x)-4 a^5 b C \sin (d x)+a^3 b^3 C \sin (d x)\right )}{a^4 \left (a^2-b^2\right )^2 d (A+2 C+2 B \cos (c+d x)+A \cos (2 c+2 d x)) (a+b \sec (c+d x))^3}+\frac {2 A (b+a \cos (c+d x))^3 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \tan (c+d x)}{a^3 d (A+2 C+2 B \cos (c+d x)+A \cos (2 c+2 d x)) (a+b \sec (c+d x))^3} \]
(-2*(3*A*b - a*B)*x*(b + a*Cos[c + d*x])^3*Sec[c + d*x]*(A + B*Sec[c + d*x ] + C*Sec[c + d*x]^2))/(a^4*(A + 2*C + 2*B*Cos[c + d*x] + A*Cos[2*c + 2*d* x])*(a + b*Sec[c + d*x])^3) + ((12*a^4*A*b^2 - 15*a^2*A*b^4 + 6*A*b^6 - 6* a^5*b*B + 5*a^3*b^3*B - 2*a*b^5*B + 2*a^6*C + a^4*b^2*C)*(b + a*Cos[c + d* x])^3*Sec[c + d*x]*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(((-2*I)*ArcTan [Sec[(d*x)/2]*(Cos[c]/(Sqrt[a^2 - b^2]*Sqrt[Cos[2*c] - I*Sin[2*c]]) - (I*S in[c])/(Sqrt[a^2 - b^2]*Sqrt[Cos[2*c] - I*Sin[2*c]]))*((-I)*b*Sin[(d*x)/2] + I*a*Sin[c + (d*x)/2])]*Cos[c])/(a^4*Sqrt[a^2 - b^2]*d*Sqrt[Cos[2*c] - I *Sin[2*c]]) - (2*ArcTan[Sec[(d*x)/2]*(Cos[c]/(Sqrt[a^2 - b^2]*Sqrt[Cos[2*c ] - I*Sin[2*c]]) - (I*Sin[c])/(Sqrt[a^2 - b^2]*Sqrt[Cos[2*c] - I*Sin[2*c]] ))*((-I)*b*Sin[(d*x)/2] + I*a*Sin[c + (d*x)/2])]*Sin[c])/(a^4*Sqrt[a^2 - b ^2]*d*Sqrt[Cos[2*c] - I*Sin[2*c]])))/((-a^2 + b^2)^2*(A + 2*C + 2*B*Cos[c + d*x] + A*Cos[2*c + 2*d*x])*(a + b*Sec[c + d*x])^3) + ((b + a*Cos[c + d*x ])*Sec[c]*Sec[c + d*x]*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(-(A*b^5*Si n[c]) + a*b^4*B*Sin[c] - a^2*b^3*C*Sin[c] + a*A*b^4*Sin[d*x] - a^2*b^3*B*S in[d*x] + a^3*b^2*C*Sin[d*x]))/(a^4*(a^2 - b^2)*d*(A + 2*C + 2*B*Cos[c + d *x] + A*Cos[2*c + 2*d*x])*(a + b*Sec[c + d*x])^3) + ((b + a*Cos[c + d*x])^ 2*Sec[c]*Sec[c + d*x]*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(9*a^2*A*b^4 *Sin[c] - 6*A*b^6*Sin[c] - 7*a^3*b^3*B*Sin[c] + 4*a*b^5*B*Sin[c] + 5*a^4*b ^2*C*Sin[c] - 2*a^2*b^4*C*Sin[c] - 8*a^3*A*b^3*Sin[d*x] + 5*a*A*b^5*Sin...
Time = 2.15 (sec) , antiderivative size = 364, normalized size of antiderivative = 1.10, number of steps used = 16, number of rules used = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.385, Rules used = {3042, 4588, 3042, 4588, 25, 3042, 4592, 25, 3042, 4407, 3042, 4318, 3042, 3138, 221}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cos (c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^3} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {A+B \csc \left (c+d x+\frac {\pi }{2}\right )+C \csc \left (c+d x+\frac {\pi }{2}\right )^2}{\csc \left (c+d x+\frac {\pi }{2}\right ) \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^3}dx\) |
\(\Big \downarrow \) 4588 |
\(\displaystyle \frac {\sin (c+d x) \left (A b^2-a (b B-a C)\right )}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}-\frac {\int \frac {\cos (c+d x) \left (-\left ((2 A-C) a^2\right )-b B a+2 (A b+C b-a B) \sec (c+d x) a+3 A b^2-2 \left (A b^2-a (b B-a C)\right ) \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^2}dx}{2 a \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\sin (c+d x) \left (A b^2-a (b B-a C)\right )}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}-\frac {\int \frac {-\left ((2 A-C) a^2\right )-b B a+2 (A b+C b-a B) \csc \left (c+d x+\frac {\pi }{2}\right ) a+3 A b^2-2 \left (A b^2-a (b B-a C)\right ) \csc \left (c+d x+\frac {\pi }{2}\right )^2}{\csc \left (c+d x+\frac {\pi }{2}\right ) \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^2}dx}{2 a \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 4588 |
\(\displaystyle \frac {\sin (c+d x) \left (A b^2-a (b B-a C)\right )}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}-\frac {\frac {\sin (c+d x) \left (-2 a^4 C+4 a^3 b B-a^2 b^2 (6 A+C)-a b^3 B+3 A b^4\right )}{a d \left (a^2-b^2\right ) (a+b \sec (c+d x))}-\frac {\int -\frac {\cos (c+d x) \left (-\left ((2 A-3 C) a^4\right )-5 b B a^3+11 A b^2 a^2+2 b^3 B a-\left (2 B a^3-b (4 A+3 C) a^2+b^2 B a+A b^3\right ) \sec (c+d x) a-6 A b^4+\left (-2 C a^4+4 b B a^3-b^2 (6 A+C) a^2-b^3 B a+3 A b^4\right ) \sec ^2(c+d x)\right )}{a+b \sec (c+d x)}dx}{a \left (a^2-b^2\right )}}{2 a \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\sin (c+d x) \left (A b^2-a (b B-a C)\right )}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}-\frac {\frac {\int \frac {\cos (c+d x) \left (-\left ((2 A-3 C) a^4\right )-5 b B a^3+11 A b^2 a^2+2 b^3 B a-\left (2 B a^3-b (4 A+3 C) a^2+b^2 B a+A b^3\right ) \sec (c+d x) a-6 A b^4+\left (-2 C a^4+4 b B a^3-b^2 (6 A+C) a^2-b^3 B a+3 A b^4\right ) \sec ^2(c+d x)\right )}{a+b \sec (c+d x)}dx}{a \left (a^2-b^2\right )}+\frac {\sin (c+d x) \left (-2 a^4 C+4 a^3 b B-a^2 b^2 (6 A+C)-a b^3 B+3 A b^4\right )}{a d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 a \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\sin (c+d x) \left (A b^2-a (b B-a C)\right )}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}-\frac {\frac {\int \frac {-\left ((2 A-3 C) a^4\right )-5 b B a^3+11 A b^2 a^2+2 b^3 B a-\left (2 B a^3-b (4 A+3 C) a^2+b^2 B a+A b^3\right ) \csc \left (c+d x+\frac {\pi }{2}\right ) a-6 A b^4+\left (-2 C a^4+4 b B a^3-b^2 (6 A+C) a^2-b^3 B a+3 A b^4\right ) \csc \left (c+d x+\frac {\pi }{2}\right )^2}{\csc \left (c+d x+\frac {\pi }{2}\right ) \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )}dx}{a \left (a^2-b^2\right )}+\frac {\sin (c+d x) \left (-2 a^4 C+4 a^3 b B-a^2 b^2 (6 A+C)-a b^3 B+3 A b^4\right )}{a d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 a \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 4592 |
\(\displaystyle \frac {\sin (c+d x) \left (A b^2-a (b B-a C)\right )}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}-\frac {\frac {\frac {\sin (c+d x) \left (-\left (a^4 (2 A-3 C)\right )-5 a^3 b B+11 a^2 A b^2+2 a b^3 B-6 A b^4\right )}{a d}-\frac {\int -\frac {2 (3 A b-a B) \left (a^2-b^2\right )^2+a \left (-2 C a^4+4 b B a^3-b^2 (6 A+C) a^2-b^3 B a+3 A b^4\right ) \sec (c+d x)}{a+b \sec (c+d x)}dx}{a}}{a \left (a^2-b^2\right )}+\frac {\sin (c+d x) \left (-2 a^4 C+4 a^3 b B-a^2 b^2 (6 A+C)-a b^3 B+3 A b^4\right )}{a d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 a \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\sin (c+d x) \left (A b^2-a (b B-a C)\right )}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}-\frac {\frac {\frac {\int \frac {2 (3 A b-a B) \left (a^2-b^2\right )^2+a \left (-2 C a^4+4 b B a^3-b^2 (6 A+C) a^2-b^3 B a+3 A b^4\right ) \sec (c+d x)}{a+b \sec (c+d x)}dx}{a}+\frac {\sin (c+d x) \left (-\left (a^4 (2 A-3 C)\right )-5 a^3 b B+11 a^2 A b^2+2 a b^3 B-6 A b^4\right )}{a d}}{a \left (a^2-b^2\right )}+\frac {\sin (c+d x) \left (-2 a^4 C+4 a^3 b B-a^2 b^2 (6 A+C)-a b^3 B+3 A b^4\right )}{a d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 a \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\sin (c+d x) \left (A b^2-a (b B-a C)\right )}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}-\frac {\frac {\frac {\int \frac {2 (3 A b-a B) \left (a^2-b^2\right )^2+a \left (-2 C a^4+4 b B a^3-b^2 (6 A+C) a^2-b^3 B a+3 A b^4\right ) \csc \left (c+d x+\frac {\pi }{2}\right )}{a+b \csc \left (c+d x+\frac {\pi }{2}\right )}dx}{a}+\frac {\sin (c+d x) \left (-\left (a^4 (2 A-3 C)\right )-5 a^3 b B+11 a^2 A b^2+2 a b^3 B-6 A b^4\right )}{a d}}{a \left (a^2-b^2\right )}+\frac {\sin (c+d x) \left (-2 a^4 C+4 a^3 b B-a^2 b^2 (6 A+C)-a b^3 B+3 A b^4\right )}{a d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 a \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 4407 |
\(\displaystyle \frac {\sin (c+d x) \left (A b^2-a (b B-a C)\right )}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}-\frac {\frac {\frac {\frac {\left (-2 a^6 C+6 a^5 b B-a^4 b^2 (12 A+C)-5 a^3 b^3 B+15 a^2 A b^4+2 a b^5 B-6 A b^6\right ) \int \frac {\sec (c+d x)}{a+b \sec (c+d x)}dx}{a}+\frac {2 x \left (a^2-b^2\right )^2 (3 A b-a B)}{a}}{a}+\frac {\sin (c+d x) \left (-\left (a^4 (2 A-3 C)\right )-5 a^3 b B+11 a^2 A b^2+2 a b^3 B-6 A b^4\right )}{a d}}{a \left (a^2-b^2\right )}+\frac {\sin (c+d x) \left (-2 a^4 C+4 a^3 b B-a^2 b^2 (6 A+C)-a b^3 B+3 A b^4\right )}{a d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 a \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\sin (c+d x) \left (A b^2-a (b B-a C)\right )}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}-\frac {\frac {\frac {\frac {\left (-2 a^6 C+6 a^5 b B-a^4 b^2 (12 A+C)-5 a^3 b^3 B+15 a^2 A b^4+2 a b^5 B-6 A b^6\right ) \int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )}{a+b \csc \left (c+d x+\frac {\pi }{2}\right )}dx}{a}+\frac {2 x \left (a^2-b^2\right )^2 (3 A b-a B)}{a}}{a}+\frac {\sin (c+d x) \left (-\left (a^4 (2 A-3 C)\right )-5 a^3 b B+11 a^2 A b^2+2 a b^3 B-6 A b^4\right )}{a d}}{a \left (a^2-b^2\right )}+\frac {\sin (c+d x) \left (-2 a^4 C+4 a^3 b B-a^2 b^2 (6 A+C)-a b^3 B+3 A b^4\right )}{a d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 a \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 4318 |
\(\displaystyle \frac {\sin (c+d x) \left (A b^2-a (b B-a C)\right )}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}-\frac {\frac {\frac {\frac {\left (-2 a^6 C+6 a^5 b B-a^4 b^2 (12 A+C)-5 a^3 b^3 B+15 a^2 A b^4+2 a b^5 B-6 A b^6\right ) \int \frac {1}{\frac {a \cos (c+d x)}{b}+1}dx}{a b}+\frac {2 x \left (a^2-b^2\right )^2 (3 A b-a B)}{a}}{a}+\frac {\sin (c+d x) \left (-\left (a^4 (2 A-3 C)\right )-5 a^3 b B+11 a^2 A b^2+2 a b^3 B-6 A b^4\right )}{a d}}{a \left (a^2-b^2\right )}+\frac {\sin (c+d x) \left (-2 a^4 C+4 a^3 b B-a^2 b^2 (6 A+C)-a b^3 B+3 A b^4\right )}{a d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 a \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\sin (c+d x) \left (A b^2-a (b B-a C)\right )}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}-\frac {\frac {\frac {\frac {\left (-2 a^6 C+6 a^5 b B-a^4 b^2 (12 A+C)-5 a^3 b^3 B+15 a^2 A b^4+2 a b^5 B-6 A b^6\right ) \int \frac {1}{\frac {a \sin \left (c+d x+\frac {\pi }{2}\right )}{b}+1}dx}{a b}+\frac {2 x \left (a^2-b^2\right )^2 (3 A b-a B)}{a}}{a}+\frac {\sin (c+d x) \left (-\left (a^4 (2 A-3 C)\right )-5 a^3 b B+11 a^2 A b^2+2 a b^3 B-6 A b^4\right )}{a d}}{a \left (a^2-b^2\right )}+\frac {\sin (c+d x) \left (-2 a^4 C+4 a^3 b B-a^2 b^2 (6 A+C)-a b^3 B+3 A b^4\right )}{a d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 a \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 3138 |
\(\displaystyle \frac {\sin (c+d x) \left (A b^2-a (b B-a C)\right )}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}-\frac {\frac {\frac {\frac {2 \left (-2 a^6 C+6 a^5 b B-a^4 b^2 (12 A+C)-5 a^3 b^3 B+15 a^2 A b^4+2 a b^5 B-6 A b^6\right ) \int \frac {1}{\left (1-\frac {a}{b}\right ) \tan ^2\left (\frac {1}{2} (c+d x)\right )+\frac {a+b}{b}}d\tan \left (\frac {1}{2} (c+d x)\right )}{a b d}+\frac {2 x \left (a^2-b^2\right )^2 (3 A b-a B)}{a}}{a}+\frac {\sin (c+d x) \left (-\left (a^4 (2 A-3 C)\right )-5 a^3 b B+11 a^2 A b^2+2 a b^3 B-6 A b^4\right )}{a d}}{a \left (a^2-b^2\right )}+\frac {\sin (c+d x) \left (-2 a^4 C+4 a^3 b B-a^2 b^2 (6 A+C)-a b^3 B+3 A b^4\right )}{a d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 a \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 221 |
\(\displaystyle \frac {\sin (c+d x) \left (A b^2-a (b B-a C)\right )}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}-\frac {\frac {\sin (c+d x) \left (-2 a^4 C+4 a^3 b B-a^2 b^2 (6 A+C)-a b^3 B+3 A b^4\right )}{a d \left (a^2-b^2\right ) (a+b \sec (c+d x))}+\frac {\frac {\sin (c+d x) \left (-\left (a^4 (2 A-3 C)\right )-5 a^3 b B+11 a^2 A b^2+2 a b^3 B-6 A b^4\right )}{a d}+\frac {\frac {2 x \left (a^2-b^2\right )^2 (3 A b-a B)}{a}+\frac {2 \left (-2 a^6 C+6 a^5 b B-a^4 b^2 (12 A+C)-5 a^3 b^3 B+15 a^2 A b^4+2 a b^5 B-6 A b^6\right ) \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a d \sqrt {a-b} \sqrt {a+b}}}{a}}{a \left (a^2-b^2\right )}}{2 a \left (a^2-b^2\right )}\) |
((A*b^2 - a*(b*B - a*C))*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Sec[c + d *x])^2) - (((3*A*b^4 + 4*a^3*b*B - a*b^3*B - 2*a^4*C - a^2*b^2*(6*A + C))* Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])) + (((2*(a^2 - b^2)^2* (3*A*b - a*B)*x)/a + (2*(15*a^2*A*b^4 - 6*A*b^6 + 6*a^5*b*B - 5*a^3*b^3*B + 2*a*b^5*B - 2*a^6*C - a^4*b^2*(12*A + C))*ArcTanh[(Sqrt[a - b]*Tan[(c + d*x)/2])/Sqrt[a + b]])/(a*Sqrt[a - b]*Sqrt[a + b]*d))/a + ((11*a^2*A*b^2 - 6*A*b^4 - 5*a^3*b*B + 2*a*b^3*B - a^4*(2*A - 3*C))*Sin[c + d*x])/(a*d))/( a*(a^2 - b^2)))/(2*a*(a^2 - b^2))
3.10.21.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x /Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{ e = FreeFactors[Tan[(c + d*x)/2], x]}, Simp[2*(e/d) Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0]
Int[csc[(e_.) + (f_.)*(x_)]/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbo l] :> Simp[1/b Int[1/(1 + (a/b)*Sin[e + f*x]), x], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 - b^2, 0]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[c*(x/a), x] - Simp[(b*c - a*d)/a Int[Csc[e + f* x]/(a + b*Csc[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Int[((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_. ))*(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a _))^(m_), x_Symbol] :> Simp[(A*b^2 - a*b*B + a^2*C)*Cot[e + f*x]*(a + b*Csc [e + f*x])^(m + 1)*((d*Csc[e + f*x])^n/(a*f*(m + 1)*(a^2 - b^2))), x] + Sim p[1/(a*(m + 1)*(a^2 - b^2)) Int[(a + b*Csc[e + f*x])^(m + 1)*(d*Csc[e + f *x])^n*Simp[a*(a*A - b*B + a*C)*(m + 1) - (A*b^2 - a*b*B + a^2*C)*(m + n + 1) - a*(A*b - a*B + b*C)*(m + 1)*Csc[e + f*x] + (A*b^2 - a*b*B + a^2*C)*(m + n + 2)*Csc[e + f*x]^2, x], x], x] /; FreeQ[{a, b, d, e, f, A, B, C, n}, x ] && NeQ[a^2 - b^2, 0] && LtQ[m, -1] && !(ILtQ[m + 1/2, 0] && ILtQ[n, 0])
Int[((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_. ))*(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a _))^(m_), x_Symbol] :> Simp[A*Cot[e + f*x]*(a + b*Csc[e + f*x])^(m + 1)*((d *Csc[e + f*x])^n/(a*f*n)), x] + Simp[1/(a*d*n) Int[(a + b*Csc[e + f*x])^m *(d*Csc[e + f*x])^(n + 1)*Simp[a*B*n - A*b*(m + n + 1) + a*(A + A*n + C*n)* Csc[e + f*x] + A*b*(m + n + 2)*Csc[e + f*x]^2, x], x], x] /; FreeQ[{a, b, d , e, f, A, B, C, m}, x] && NeQ[a^2 - b^2, 0] && LeQ[n, -1]
Time = 0.83 (sec) , antiderivative size = 398, normalized size of antiderivative = 1.21
method | result | size |
derivativedivides | \(\frac {-\frac {2 \left (\frac {-\frac {\left (8 A \,a^{2} b^{2}+a A \,b^{3}-4 A \,b^{4}-6 B \,a^{3} b -B \,a^{2} b^{2}+2 B a \,b^{3}+4 a^{4} C +a^{3} b C \right ) a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{2 \left (a -b \right ) \left (a^{2}+2 a b +b^{2}\right )}+\frac {b a \left (8 A \,a^{2} b^{2}-a A \,b^{3}-4 A \,b^{4}-6 B \,a^{3} b +B \,a^{2} b^{2}+2 B a \,b^{3}+4 a^{4} C -a^{3} b C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 \left (a +b \right ) \left (a -b \right )^{2}}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b -a -b \right )^{2}}-\frac {\left (12 A \,a^{4} b^{2}-15 a^{2} A \,b^{4}+6 A \,b^{6}-6 a^{5} b B +5 a^{3} b^{3} B -2 a \,b^{5} B +2 a^{6} C +a^{4} b^{2} C \right ) \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{2 \left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) \sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{a^{4}}-\frac {2 \left (-\frac {A a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}+\left (3 A b -a B \right ) \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )\right )}{a^{4}}}{d}\) | \(398\) |
default | \(\frac {-\frac {2 \left (\frac {-\frac {\left (8 A \,a^{2} b^{2}+a A \,b^{3}-4 A \,b^{4}-6 B \,a^{3} b -B \,a^{2} b^{2}+2 B a \,b^{3}+4 a^{4} C +a^{3} b C \right ) a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{2 \left (a -b \right ) \left (a^{2}+2 a b +b^{2}\right )}+\frac {b a \left (8 A \,a^{2} b^{2}-a A \,b^{3}-4 A \,b^{4}-6 B \,a^{3} b +B \,a^{2} b^{2}+2 B a \,b^{3}+4 a^{4} C -a^{3} b C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 \left (a +b \right ) \left (a -b \right )^{2}}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b -a -b \right )^{2}}-\frac {\left (12 A \,a^{4} b^{2}-15 a^{2} A \,b^{4}+6 A \,b^{6}-6 a^{5} b B +5 a^{3} b^{3} B -2 a \,b^{5} B +2 a^{6} C +a^{4} b^{2} C \right ) \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{2 \left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) \sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{a^{4}}-\frac {2 \left (-\frac {A a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}+\left (3 A b -a B \right ) \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )\right )}{a^{4}}}{d}\) | \(398\) |
risch | \(\text {Expression too large to display}\) | \(1875\) |
1/d*(-2/a^4*((-1/2*(8*A*a^2*b^2+A*a*b^3-4*A*b^4-6*B*a^3*b-B*a^2*b^2+2*B*a* b^3+4*C*a^4+C*a^3*b)*a*b/(a-b)/(a^2+2*a*b+b^2)*tan(1/2*d*x+1/2*c)^3+1/2*b* a*(8*A*a^2*b^2-A*a*b^3-4*A*b^4-6*B*a^3*b+B*a^2*b^2+2*B*a*b^3+4*C*a^4-C*a^3 *b)/(a+b)/(a-b)^2*tan(1/2*d*x+1/2*c))/(tan(1/2*d*x+1/2*c)^2*a-tan(1/2*d*x+ 1/2*c)^2*b-a-b)^2-1/2*(12*A*a^4*b^2-15*A*a^2*b^4+6*A*b^6-6*B*a^5*b+5*B*a^3 *b^3-2*B*a*b^5+2*C*a^6+C*a^4*b^2)/(a^4-2*a^2*b^2+b^4)/((a+b)*(a-b))^(1/2)* arctanh((a-b)*tan(1/2*d*x+1/2*c)/((a+b)*(a-b))^(1/2)))-2/a^4*(-A*a*tan(1/2 *d*x+1/2*c)/(1+tan(1/2*d*x+1/2*c)^2)+(3*A*b-B*a)*arctan(tan(1/2*d*x+1/2*c) )))
Leaf count of result is larger than twice the leaf count of optimal. 811 vs. \(2 (307) = 614\).
Time = 0.41 (sec) , antiderivative size = 1680, normalized size of antiderivative = 5.09 \[ \int \frac {\cos (c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^3} \, dx=\text {Too large to display} \]
integrate(cos(d*x+c)*(A+B*sec(d*x+c)+C*sec(d*x+c)^2)/(a+b*sec(d*x+c))^3,x, algorithm="fricas")
[1/4*(4*(B*a^9 - 3*A*a^8*b - 3*B*a^7*b^2 + 9*A*a^6*b^3 + 3*B*a^5*b^4 - 9*A *a^4*b^5 - B*a^3*b^6 + 3*A*a^2*b^7)*d*x*cos(d*x + c)^2 + 8*(B*a^8*b - 3*A* a^7*b^2 - 3*B*a^6*b^3 + 9*A*a^5*b^4 + 3*B*a^4*b^5 - 9*A*a^3*b^6 - B*a^2*b^ 7 + 3*A*a*b^8)*d*x*cos(d*x + c) + 4*(B*a^7*b^2 - 3*A*a^6*b^3 - 3*B*a^5*b^4 + 9*A*a^4*b^5 + 3*B*a^3*b^6 - 9*A*a^2*b^7 - B*a*b^8 + 3*A*b^9)*d*x + (2*C *a^6*b^2 - 6*B*a^5*b^3 + (12*A + C)*a^4*b^4 + 5*B*a^3*b^5 - 15*A*a^2*b^6 - 2*B*a*b^7 + 6*A*b^8 + (2*C*a^8 - 6*B*a^7*b + (12*A + C)*a^6*b^2 + 5*B*a^5 *b^3 - 15*A*a^4*b^4 - 2*B*a^3*b^5 + 6*A*a^2*b^6)*cos(d*x + c)^2 + 2*(2*C*a ^7*b - 6*B*a^6*b^2 + (12*A + C)*a^5*b^3 + 5*B*a^4*b^4 - 15*A*a^3*b^5 - 2*B *a^2*b^6 + 6*A*a*b^7)*cos(d*x + c))*sqrt(a^2 - b^2)*log((2*a*b*cos(d*x + c ) - (a^2 - 2*b^2)*cos(d*x + c)^2 + 2*sqrt(a^2 - b^2)*(b*cos(d*x + c) + a)* sin(d*x + c) + 2*a^2 - b^2)/(a^2*cos(d*x + c)^2 + 2*a*b*cos(d*x + c) + b^2 )) + 2*((2*A - 3*C)*a^7*b^2 + 5*B*a^6*b^3 - (13*A - 3*C)*a^5*b^4 - 7*B*a^4 *b^5 + 17*A*a^3*b^6 + 2*B*a^2*b^7 - 6*A*a*b^8 + 2*(A*a^9 - 3*A*a^7*b^2 + 3 *A*a^5*b^4 - A*a^3*b^6)*cos(d*x + c)^2 + (4*(A - C)*a^8*b + 6*B*a^7*b^2 - 5*(4*A - C)*a^6*b^3 - 9*B*a^5*b^4 + (25*A - C)*a^4*b^5 + 3*B*a^3*b^6 - 9*A *a^2*b^7)*cos(d*x + c))*sin(d*x + c))/((a^12 - 3*a^10*b^2 + 3*a^8*b^4 - a^ 6*b^6)*d*cos(d*x + c)^2 + 2*(a^11*b - 3*a^9*b^3 + 3*a^7*b^5 - a^5*b^7)*d*c os(d*x + c) + (a^10*b^2 - 3*a^8*b^4 + 3*a^6*b^6 - a^4*b^8)*d), 1/2*(2*(B*a ^9 - 3*A*a^8*b - 3*B*a^7*b^2 + 9*A*a^6*b^3 + 3*B*a^5*b^4 - 9*A*a^4*b^5 ...
\[ \int \frac {\cos (c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^3} \, dx=\int \frac {\left (A + B \sec {\left (c + d x \right )} + C \sec ^{2}{\left (c + d x \right )}\right ) \cos {\left (c + d x \right )}}{\left (a + b \sec {\left (c + d x \right )}\right )^{3}}\, dx \]
Exception generated. \[ \int \frac {\cos (c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^3} \, dx=\text {Exception raised: ValueError} \]
integrate(cos(d*x+c)*(A+B*sec(d*x+c)+C*sec(d*x+c)^2)/(a+b*sec(d*x+c))^3,x, algorithm="maxima")
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*a^2-4*b^2>0)', see `assume?` f or more de
Leaf count of result is larger than twice the leaf count of optimal. 667 vs. \(2 (307) = 614\).
Time = 0.40 (sec) , antiderivative size = 667, normalized size of antiderivative = 2.02 \[ \int \frac {\cos (c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^3} \, dx=\frac {\frac {{\left (2 \, C a^{6} - 6 \, B a^{5} b + 12 \, A a^{4} b^{2} + C a^{4} b^{2} + 5 \, B a^{3} b^{3} - 15 \, A a^{2} b^{4} - 2 \, B a b^{5} + 6 \, A b^{6}\right )} {\left (\pi \left \lfloor \frac {d x + c}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (-2 \, a + 2 \, b\right ) + \arctan \left (-\frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\sqrt {-a^{2} + b^{2}}}\right )\right )}}{{\left (a^{8} - 2 \, a^{6} b^{2} + a^{4} b^{4}\right )} \sqrt {-a^{2} + b^{2}}} + \frac {4 \, C a^{5} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 6 \, B a^{4} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 3 \, C a^{4} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 8 \, A a^{3} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 5 \, B a^{3} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - C a^{3} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 7 \, A a^{2} b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 3 \, B a^{2} b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 5 \, A a b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 2 \, B a b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 4 \, A b^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 4 \, C a^{5} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 6 \, B a^{4} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 3 \, C a^{4} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 8 \, A a^{3} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 5 \, B a^{3} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + C a^{3} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 7 \, A a^{2} b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 3 \, B a^{2} b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 5 \, A a b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \, B a b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 4 \, A b^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (a^{7} - 2 \, a^{5} b^{2} + a^{3} b^{4}\right )} {\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a - b\right )}^{2}} + \frac {{\left (B a - 3 \, A b\right )} {\left (d x + c\right )}}{a^{4}} + \frac {2 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )} a^{3}}}{d} \]
((2*C*a^6 - 6*B*a^5*b + 12*A*a^4*b^2 + C*a^4*b^2 + 5*B*a^3*b^3 - 15*A*a^2* b^4 - 2*B*a*b^5 + 6*A*b^6)*(pi*floor(1/2*(d*x + c)/pi + 1/2)*sgn(-2*a + 2* b) + arctan(-(a*tan(1/2*d*x + 1/2*c) - b*tan(1/2*d*x + 1/2*c))/sqrt(-a^2 + b^2)))/((a^8 - 2*a^6*b^2 + a^4*b^4)*sqrt(-a^2 + b^2)) + (4*C*a^5*b*tan(1/ 2*d*x + 1/2*c)^3 - 6*B*a^4*b^2*tan(1/2*d*x + 1/2*c)^3 - 3*C*a^4*b^2*tan(1/ 2*d*x + 1/2*c)^3 + 8*A*a^3*b^3*tan(1/2*d*x + 1/2*c)^3 + 5*B*a^3*b^3*tan(1/ 2*d*x + 1/2*c)^3 - C*a^3*b^3*tan(1/2*d*x + 1/2*c)^3 - 7*A*a^2*b^4*tan(1/2* d*x + 1/2*c)^3 + 3*B*a^2*b^4*tan(1/2*d*x + 1/2*c)^3 - 5*A*a*b^5*tan(1/2*d* x + 1/2*c)^3 - 2*B*a*b^5*tan(1/2*d*x + 1/2*c)^3 + 4*A*b^6*tan(1/2*d*x + 1/ 2*c)^3 - 4*C*a^5*b*tan(1/2*d*x + 1/2*c) + 6*B*a^4*b^2*tan(1/2*d*x + 1/2*c) - 3*C*a^4*b^2*tan(1/2*d*x + 1/2*c) - 8*A*a^3*b^3*tan(1/2*d*x + 1/2*c) + 5 *B*a^3*b^3*tan(1/2*d*x + 1/2*c) + C*a^3*b^3*tan(1/2*d*x + 1/2*c) - 7*A*a^2 *b^4*tan(1/2*d*x + 1/2*c) - 3*B*a^2*b^4*tan(1/2*d*x + 1/2*c) + 5*A*a*b^5*t an(1/2*d*x + 1/2*c) - 2*B*a*b^5*tan(1/2*d*x + 1/2*c) + 4*A*b^6*tan(1/2*d*x + 1/2*c))/((a^7 - 2*a^5*b^2 + a^3*b^4)*(a*tan(1/2*d*x + 1/2*c)^2 - b*tan( 1/2*d*x + 1/2*c)^2 - a - b)^2) + (B*a - 3*A*b)*(d*x + c)/a^4 + 2*A*tan(1/2 *d*x + 1/2*c)/((tan(1/2*d*x + 1/2*c)^2 + 1)*a^3))/d
Time = 23.50 (sec) , antiderivative size = 6708, normalized size of antiderivative = 20.33 \[ \int \frac {\cos (c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^3} \, dx=\text {Too large to display} \]
((tan(c/2 + (d*x)/2)*(2*A*a^5 + 6*A*b^5 - 12*A*a^2*b^3 - 4*A*a^3*b^2 - B*a ^2*b^3 + 6*B*a^3*b^2 + C*a^3*b^2 + 3*A*a*b^4 + 2*A*a^4*b - 2*B*a*b^4 - 4*C *a^4*b))/((a + b)*(a^5 - 2*a^4*b + a^3*b^2)) - (tan(c/2 + (d*x)/2)^5*(2*A* a^5 - 6*A*b^5 + 12*A*a^2*b^3 - 4*A*a^3*b^2 - B*a^2*b^3 - 6*B*a^3*b^2 + C*a ^3*b^2 + 3*A*a*b^4 - 2*A*a^4*b + 2*B*a*b^4 + 4*C*a^4*b))/((a^3*b - a^4)*(a + b)^2) + (2*tan(c/2 + (d*x)/2)^3*(2*A*a^6 - 6*A*b^6 + 13*A*a^2*b^4 - 6*A *a^4*b^2 - 5*B*a^3*b^3 + 3*C*a^4*b^2 + 2*B*a*b^5))/(a*(a^2*b - a^3)*(a + b )^2*(a - b)))/(d*(2*a*b + tan(c/2 + (d*x)/2)^2*(2*a*b - a^2 + 3*b^2) + tan (c/2 + (d*x)/2)^6*(a^2 - 2*a*b + b^2) + a^2 + b^2 - tan(c/2 + (d*x)/2)^4*( 2*a*b + a^2 - 3*b^2))) + (log(tan(c/2 + (d*x)/2) - 1i)*(3*A*b - B*a)*1i)/( a^4*d) - (log(tan(c/2 + (d*x)/2) + 1i)*(A*b*3i - B*a*1i))/(a^4*d) - (atan( ((((a + b)^5*(a - b)^5)^(1/2)*((8*tan(c/2 + (d*x)/2)*(72*A^2*b^12 + 4*B^2* a^12 + 4*C^2*a^12 - 72*A^2*a*b^11 - 8*B^2*a^11*b - 288*A^2*a^2*b^10 + 288* A^2*a^3*b^9 + 441*A^2*a^4*b^8 - 432*A^2*a^5*b^7 - 288*A^2*a^6*b^6 + 288*A^ 2*a^7*b^5 + 36*A^2*a^8*b^4 - 72*A^2*a^9*b^3 + 36*A^2*a^10*b^2 + 8*B^2*a^2* b^10 - 8*B^2*a^3*b^9 - 32*B^2*a^4*b^8 + 32*B^2*a^5*b^7 + 57*B^2*a^6*b^6 - 48*B^2*a^7*b^5 - 52*B^2*a^8*b^4 + 32*B^2*a^9*b^3 + 24*B^2*a^10*b^2 + C^2*a ^8*b^4 + 4*C^2*a^10*b^2 - 48*A*B*a*b^11 - 24*A*B*a^11*b - 24*B*C*a^11*b + 48*A*B*a^2*b^10 + 192*A*B*a^3*b^9 - 192*A*B*a^4*b^8 - 318*A*B*a^5*b^7 + 28 8*A*B*a^6*b^6 + 252*A*B*a^7*b^5 - 192*A*B*a^8*b^4 - 72*A*B*a^9*b^3 + 48...